package com.pet.platform.dto;

import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class OrderDTO {
    private Long id;
    private Long userId;
    
    // 用户名
    private String username;
    
    // 订单号
    private String orderNo;
    
    // 地址ID
    private Long addressId;
    
    // 支付方式
    private String paymentMethod;
    
    // 订单备注
    private String remark;
    
    // 收货人姓名
    private String receiverName;
    
    // 收货人电话
    private String receiverPhone;
    
    // 收货地址
    private String receiverAddress;
    
    @NotNull(message = "订单总金额不能为空")
    private BigDecimal totalAmount;
    
    private String status; // PENDING/CONFIRMED/COMPLETED/CANCELLED
    private LocalDateTime createdTime;
    private LocalDateTime updatedTime;
    
    @NotEmpty(message = "订单项不能为空")
    private List<OrderItemDTO> orderItems;

    @Data
    public static class OrderItemDTO {
        private Long id;
        private Long productId;
        private String productName;
        private String imageUrl;
        private Integer quantity;
        private BigDecimal price;
    }
} 